home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / lib / Process.sig < prev    next >
Encoding:
Text File  |  1997-08-18  |  1.3 KB  |  43 lines  |  [TEXT/Moml]

  1. (* OS.Process -- SML Basis Library *)
  2.  
  3. eqtype status
  4.  
  5. val success   : status
  6. val failure   : status
  7.  
  8. val system    : string -> status
  9.  
  10. val atExit    : (unit -> unit) -> unit
  11. val exit      : status -> 'a
  12. val terminate : status -> 'a
  13.  
  14. val getEnv    : string -> string option
  15.  
  16. (* Portable functions for manipulating processes.
  17.  
  18.    [success] is the unique status value that signifies successful
  19.    termination of a process.  Note: MS DOS (sometimes) believes that
  20.    all processes are successful.
  21.  
  22.    [failure] is a status value that signifies an error during
  23.    execution of a process.  Note that in contrast to the success
  24.    value, there may be several distinct failure values.
  25.  
  26.    [system cmd] asks the operating system to execute command cmd, and
  27.    returns a status value.
  28.  
  29.    [atExit act] registers the action act to be executed when the
  30.    current SML program calls Process.exit.  Actions will be executed
  31.    in reverse order of registration.
  32.  
  33.    [exit i] executes all registered actions, then terminates the SML
  34.    process with completion code i.
  35.  
  36.    [terminate i] terminates the SML process with completion code i 
  37.    (but without executing the registered actions).
  38.  
  39.    [getEnv evar] returns SOME s if the environment variable evar is
  40.    defined and is associated with the string s; otherwise NONE.
  41.  
  42. *)
  43.